<?php
/**
 * 调用新模板接口
 * 
 * */

//ini_set("display_errors", "On"); 
//error_reporting(E_ERROR);


define('IN_WONDERSHARE', true);
define('DIR', '/var/www/website/cms.wondershare.fr/httpdocs/');

require( DIR.'inc/config.inc.php');
require( DIR.'/includes/cls_mysql.php');
require( DIR.'/inc/Function.php');
require_once( DIR.'/new_template/products/'.$_GET['web_type'].'_products.php');

if( empty($db) ){
	$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
}

$web_type = $_GET['web_type'];
$product_id = $_GET['产品ID'] = $_GET['product_id'];
$fun = $_GET['fun'];

if( !$web_type || !$product_id || !$fun ){
	exit('web_type OR product_id OR fun is empty!');
}

$class = ucfirst( $web_type ).'Products';

$p = new $class();
$str = $p->$fun( $_GET );

echo $str;

